package com.bsj.power.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsj.power.common.def.entity.locationDevice.LocationDeviceLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description 设备日志持久层
 * @time 2024/12/6 10:03
 */
public interface LocationDeviceLogMapper extends BaseMapper<LocationDeviceLog> {

    /**
     * 根据设备号查询最后一条基站在线离线日志
     *
     * @param deviceName
     * @return com.bsj.power.common.def.entity.locationDevice.LocationDeviceLog
     * @author ljx
     * @time 2025/2/24 19:12
     */
    LocationDeviceLog selectLast(String deviceName);

    /**
     * 批量添加基站上线离线日志
     *
     * @param addLocationDeviceLogList
     * @return void
     * @author ljx
     * @time 2025/2/26 10:30
     */
    void batchAdd(@Param("list") List<LocationDeviceLog> addLocationDeviceLogList);

    /**
     * 批量修改基站上线离线日志
     *
     * @param updateLocationDeviceLogList
     * @return void
     * @author ljx
     * @time 2025/2/26 10:31
     */
    void batchUpdate(@Param("list") List<LocationDeviceLog> updateLocationDeviceLogList);
}
